package com.ebt.m.commons.model.data;

/**
 * Created by andy.wang on 2016/12/9.
 */

public class BaseDataResult<T> {
    private T data;
    private PageInfo paging;
    private ErrorJson error;

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public PageInfo getPaging() {
        return paging;
    }

    public void setPaging(PageInfo paging) {
        this.paging = paging;
    }

    public ErrorJson getError() {
        return error;
    }

    public void setError(ErrorJson error) {
        this.error = error;
    }

    public class PageInfo {
        private int page;
        private int pageSize;
        private boolean hasMore;
        private int total;

        public int getPage() {
            return page;
        }

        public void setPage(int page) {
            this.page = page;
        }

        public int getPageSize() {
            return pageSize;
        }

        public void setPageSize(int pageSize) {
            this.pageSize = pageSize;
        }

        public boolean isHasMore() {
            return hasMore;
        }

        public void setHasMore(boolean hasMore) {
            this.hasMore = hasMore;
        }

        public int getTotal() {
            return total;
        }

        public void setTotal(int total) {
            this.total = total;
        }
    }

    public class ErrorJson {
        public String code;
        public String type;
        public String message;
    }
}
